namespace CSharpPro;

public class Demo
{
    //作业1 判断闰年
    //1.能被4整除，并且不能被100整除
    // 2.能被400整除
    public void Year()
    {
        Console.Write("请输入年份");
        int year = int.Parse(Console.ReadLine());
        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
        {
            Console.WriteLine($"{year}是闰年");
        }
        else
        {
            Console.WriteLine($"{year}不是润年");
        }
    }
    public class Program
    {
        public static void Year(string[] args)
        {
            Demo demo = new Demo();
            demo.Year();
        }
    }
}    

